<?php /*a:1:{s:66:"D:\AppServ\www\1803010144\app\zhongkl_forum\view\answer\lssue.html";i:1616301206;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>发布试题</title>
    <link rel="stylesheet" href="/1803010144/public/static/zhongkl_forum/CSS/answer.css">
    <link rel="stylesheet" href="/1803010144/public/static/zhongkl_forum/CSS/lssue.css">
    <script src="/1803010144/public/static/zhongkl_forum/js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="http://www.htmleaf.com/js/jquery/1.9.1/jquery.js"></script>
<script>
    function newPaper() {
        var obj = document.getElementById("newPaper");
        obj.style.cssText = "display:block";
    }
    function sub() {
        var obj = document.getElementById("newPaper");
        obj.style.cssText = "display:none";
    }
    function stopButton() {
        sub();
        return false;

    }
    function retureSubmit() {
        var slt = document.getElementById("sPaper");
        var objOption = document.createElement("OPTION");
        objOption.value = myform.inputName.value;
        objOption.text = myform.inputName.value;
        slt.add(objOption);
        slt.options[slt.options.length - 1].selected = 'selected';
        sub();
        return false;
    }
</script>
</head>

<body>
    <div class="container">
        <div class="nav">
            <ul>
                <a href="<?php echo url('Answer/index'); ?>" class="subNav">
                    <li>测试</li>
                </a>
                <a href="<?php echo url('Answer/score'); ?>" class="subNav">
                    <li>查看结果</li>
                </a>
                <a href="" class="subNav">
                    <li>当前身份</li>
                </a>
                <a href="<?php echo url('Answer/lssue'); ?>">
                    <li>发布试题</li>
                </a>
            </ul>
        </div>
        <div class="content">
            <div class="right">
                <p>温馨提示：请按照提供的文件模本格式进行上传文件，你可以点击模本链接进行下载模本</p>
                <a  href="/1803010144/public/static/zhongkl_forum/upload\TEST.xlsx" title="点击下载" download="">试题模本</a>
            </div>
            <form action="<?php echo url('Answer/doLssue'); ?>"  enctype="multipart/form-data" method="POST">
                <div class="left">
                    <p>发布试题名称</p>
                    <select name="paperName" id="sPaper">
                        <?php if(is_array($paper) || $paper instanceof \think\Collection || $paper instanceof \think\Paginator): $i = 0; $__LIST__ = $paper;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$paper): $mod = ($i % 2 );++$i;?>
                            <option value="<?php echo htmlentities($paper['p_id']); ?>"><?php echo htmlentities($paper['p_name']); ?></option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                    <input type="button" onclick="newPaper()" value="新建">
                    <p>选择上传试题文件：</p>
                    <input type="file" name="fileName" id="file">
                    <p></p>
                    <input type="submit" value="确定上传试题">
                </div>
                
            </form>
            
            <div id="newPaper">
                <div id="papers">
                    <form name="myform">
                        <input type="text" id="inputName" placeholder="请输入你要创建试卷的名称">
                        <input type="button" value="确定" onclick="retureSubmit()">
                        <input type="button" onclick="stopButton()" value="取消">
                    </form>
                </div>
            </div>
        </div>
        
    </div>
</body>

</html>